package com.coldchain.admin.resoure.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.coldchain.common.vo.TreeNodeVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 资源表
 * </p>
 *
 * @author fangliai
 * @since 2018-08-28
 */
@TableName("ch_resource")
@ApiModel
public class Resource  extends TreeNodeVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(hidden = true)
	private Integer id;
    /**
     * 模块id
     */
    @ApiModelProperty(value = "系统模块",required = true)
	private String  sysmodel;
    /**
     * 资源名称
     */
    @ApiModelProperty(value = "资源名称",name = "name",dataType = "string" ,required = true)
	private String name;
    /**
     * 排序权重,值越大则最前
     */
    @ApiModelProperty(value = "排序权重",name ="sore" ,dataType = "integer",required = false)
	private Integer sore;
    /**
     * 请求路径
     */
    @ApiModelProperty(value = "请求路径",name ="resourceUrl" ,dataType = "integer",required = true)
	private String resourceUrl;
    /**
     * 根节点
     */
    @ApiModelProperty(value = "根节点",name ="parentId" ,dataType = "integer",required = false)
	private Integer parentId;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述",name ="describes" ,dataType = "integer",required = false)
	private String describes;
    /**
     * 是否删除
     */
    @ApiModelProperty(hidden = true)
    @TableLogic
	@JSONField(serialize =false)
	private Integer deleteFlag;
    /**
     * 数据库锁
     */
    @ApiModelProperty(hidden = true)
    @Version
	@JSONField(serialize =false)
	private Integer version;
    /**
     * 创建时间
     */
    @ApiModelProperty(hidden = true)
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
    /**
     * 创建人
     */
    @ApiModelProperty(hidden = true)
	private String createBy;
    /**
     * 变更时间
     */
    @ApiModelProperty(hidden = true)
	@JSONField(serialize =false)
	private Date modTime;
    /**
     * 变更人
     */
    @ApiModelProperty(hidden = true)
	@JSONField(serialize =false)
	private String modBy;


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

    public String getSysmodel() {
        return sysmodel;
    }

    public void setSysmodel(String sysmodel) {
        this.sysmodel = sysmodel;
    }

    public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSore() {
		return sore;
	}

	public void setSore(Integer sore) {
		this.sore = sore;
	}

	public String getResourceUrl() {
		return resourceUrl;
	}

	public void setResourceUrl(String resourceUrl) {
		this.resourceUrl = resourceUrl;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getDescribes() {
		return describes;
	}

	public void setDescribes(String describes) {
		this.describes = describes;
	}

	public Integer getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(Integer deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getModTime() {
		return modTime;
	}

	public void setModTime(Date modTime) {
		this.modTime = modTime;
	}

	public String getModBy() {
		return modBy;
	}

	public void setModBy(String modBy) {
		this.modBy = modBy;
	}

    @Override
    public Object getNodeId() {
        return getId();
    }

	@Override
	public Object getParentId() {
		return parentId;
	}


}
